<?php
/* @var $this yii\web\View */
use yii\helpers\Html;
?>

<?=Html::cssFile('@web/css/personal.css')?>

<section class="layui-larry-box">
    <div class="larry-personal">
        <div class="layui-tab">
            <blockquote class="layui-elem-quote mylog-info-tit">
                <ul class="layui-tab-title">
                    <li class="layui-btn layui-this"><i class="layui-icon">&#xe60a;</i>我的操作日志</li>
                    <li class="layui-btn "><i class="layui-icon">&#xe63c;</i>我的登录日志</li>
                    <a class="layui-btn layui-btn-small larry-log-del"><i class="iconfont icon-huishouzhan1"></i>清空日志</a>
                </ul>
            </blockquote>
            <div class="larry-separate"></div>
            <div class="layui-tab-content larry-personal-body clearfix mylog-info-box">
                <!-- 操作日志 -->
                <div class="layui-tab-item layui-field-box layui-show">

                    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                        <legend>默认表格</legend>
                    </fieldset>

                    <div class="layui-form">
                        <table class="layui-table">
                            <colgroup>
                                <col width="50">
                                <col width="150">
                                <col width="150">
                                <col width="200">
                                <col>
                            </colgroup>
                            <thead>
                            <tr>
                                <th><input type="checkbox" name="" lay-skin="primary" lay-filter="allChoose"></th>
                                <th>人物</th>
                                <th>民族</th>
                                <th>出场时间</th>
                                <th>格言</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr>
                                <td><input type="checkbox" name="" lay-skin="primary"></td>
                                <td>贤心</td>
                                <td>汉族</td>
                                <td>1989-10-14</td>
                                <td>人生似修行</td>
                            </tr>
                            <tr>
                                <td><input type="checkbox" name="" lay-skin="primary"></td>
                                <td>张爱玲</td>
                                <td>汉族</td>
                                <td>1920-09-30</td>
                                <td>于千万人之中遇见你所遇见的人，于千万年之中，时间的无涯的荒野里…</td>
                            </tr>
                            <tr>
                                <td><input type="checkbox" name="" lay-skin="primary"></td>
                                <td>Helen Keller</td>
                                <td>拉丁美裔</td>
                                <td>1880-06-27</td>
                                <td> Life is either a daring adventure or nothing.</td>
                            </tr>
                            <tr>
                                <td><input type="checkbox" name="" lay-skin="primary"></td>
                                <td>岳飞</td>
                                <td>汉族</td>
                                <td>1103-北宋崇宁二年</td>
                                <td>教科书再滥改，也抹不去“民族英雄”的事实</td>
                            </tr>
                            <tr>
                                <td><input type="checkbox" name="" lay-skin="primary"></td>
                                <td>孟子</td>
                                <td>华夏族（汉族）</td>
                                <td>公元前-372年</td>
                                <td>猿强，则国强。国强，则猿更强！ </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>





                    <table class="layui-table table-hover" lay-even="" lay-skin="nob">
                        <thead>
                        <tr>
                            <th><input type="checkbox" id="selected-all"></th>
                            <th>ID</th>
                            <th>操作人</th>
                            <th>操作时间</th>
                            <th>文件</th>
                            <th>模块</th>
                            <th>控制器</th>
                            <th>方法</th>
                            <th>详细参数</th>
                            <th>操作IP</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td><input type="checkbox"></td>
                            <td>110</td>
                            <td>admin</td>
                            <td>2016-12-19</td>
                            <td>test</td>
                            <td>test</td>
                            <td>test</td>
                            <td>test</td>
                            <td>test</td>
                            <td>127.0.0.1</td>
                        </tr>
                        <tr>
                            <td><input type="checkbox"></td>
                            <td>109</td>
                            <td>admin</td>
                            <td>2016-12-19</td>
                            <td>test</td>
                            <td>test</td>
                            <td>test</td>
                            <td>test</td>
                            <td>test</td>
                            <td>127.0.0.1</td>
                        </tr>
                        <tr>
                            <td><input type="checkbox"></td>
                            <td>108</td>
                            <td>admin</td>
                            <td>2016-12-19</td>
                            <td>test</td>
                            <td>test</td>
                            <td>test</td>
                            <td>test</td>
                            <td>test</td>
                            <td>127.0.0.1</td>
                        </tr>
                        <tr>
                            <td><input type="checkbox"></td>
                            <td>107</td>
                            <td>admin</td>
                            <td>2016-12-19</td>
                            <td>test</td>
                            <td>test</td>
                            <td>test</td>
                            <td>test</td>
                            <td>test</td>
                            <td>127.0.0.1</td>
                        </tr>
                        <tr>
                            <td><input type="checkbox"></td>
                            <td>106</td>
                            <td>admin</td>
                            <td>2016-12-19</td>
                            <td>test</td>
                            <td>test</td>
                            <td>test</td>
                            <td>test</td>
                            <td>test</td>
                            <td>127.0.0.1</td>
                        </tr>
                        <tr>
                            <td><input type="checkbox"></td>
                            <td>105</td>
                            <td>admin</td>
                            <td>2016-12-19</td>
                            <td>test</td>
                            <td>test</td>
                            <td>test</td>
                            <td>test</td>
                            <td>test</td>
                            <td>127.0.0.1</td>
                        </tr>
                        <tr>
                            <td><input type="checkbox"></td>
                            <td>104</td>
                            <td>admin</td>
                            <td>2016-12-19</td>
                            <td>test</td>
                            <td>test</td>
                            <td>test</td>
                            <td>test</td>
                            <td>test</td>
                            <td>127.0.0.1</td>
                        </tr>
                        <tr>
                            <td><input type="checkbox"></td>
                            <td>103</td>
                            <td>admin</td>
                            <td>2016-12-19</td>
                            <td>test</td>
                            <td>test</td>
                            <td>test</td>
                            <td>test</td>
                            <td>test</td>
                            <td>127.0.0.1</td>
                        </tr>
                        <tr>
                            <td><input type="checkbox"></td>
                            <td>102</td>
                            <td>admin</td>
                            <td>2016-12-19</td>
                            <td>test</td>
                            <td>test</td>
                            <td>test</td>
                            <td>test</td>
                            <td>test</td>
                            <td>127.0.0.1</td>
                        </tr>
                        <tr>
                            <td><input type="checkbox"></td>
                            <td>101</td>
                            <td>admin</td>
                            <td>2016-12-19</td>
                            <td>test</td>
                            <td>test</td>
                            <td>test</td>
                            <td>test</td>
                            <td>test</td>
                            <td>127.0.0.1</td>
                        </tr>
                        <tr>
                            <td><input type="checkbox"></td>
                            <td>100</td>
                            <td>admin</td>
                            <td>2016-12-19</td>
                            <td>test</td>
                            <td>test</td>
                            <td>test</td>
                            <td>test</td>
                            <td>test</td>
                            <td>127.0.0.1</td>
                        </tr>
                        </tbody>
                    </table>
                    <div class="larry-table-page clearfix">
                        <a href="javascript:;" class="layui-btn layui-btn-small"><i class="iconfont icon-shanchu1"></i>删除</a>
                        <div id="page" class="page"></div>
                    </div>
                </div>
                <!-- 登录日志 -->
                <div class="layui-tab-item layui-field-box">
                    <table class="layui-table table-hover" lay-even="" lay-skin="nob">
                        <thead>
                        <tr>
                            <th><input type="checkbox" id="selected-all"></th>
                            <th>ID</th>
                            <th>管理员账号</th>
                            <th>状态</th>
                            <th>最后登录时间</th>
                            <th>上次登录IP</th>
                            <th>登录IP</th>
                            <th>IP所在位置</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td><input type="checkbox"></td>
                            <td>110</td>
                            <td>admin</td>
                            <td>后台登录成功</td>
                            <td>2016-12-19 14:26:03</td>
                            <td>127.0.0.1</td>
                            <td>127.0.0.1</td>
                            <td>Unknown</td>
                        </tr>
                        </tbody>
                    </table>
                    <div class="larry-table-page clearfix">
                        <a href="javascript:;" class="layui-btn layui-btn-small"><i class="iconfont icon-shanchu1"></i>删除</a>
                        <div id="page2" class="page"></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>

<?php $this->beginBlock('service') ?>

    layui.use(['jquery','layer','element','laypage'],function(){
    window.jQuery = window.$ = layui.jquery;
    window.layer = layui.layer;
    var element = layui.element(),
    laypage = layui.laypage;


    laypage({
    cont: 'page',
    pages: 10 //总页数
    ,
    groups: 5 //连续显示分页数
    ,
    jump: function(obj, first) {
    //得到了当前页，用于向服务端请求对应数据
    var curr = obj.curr;
    if(!first) {
    //layer.msg('第 '+ obj.curr +' 页');
    }
    }
    });

    laypage({
    cont: 'page2',
    pages: 10 //总页数
    ,
    groups: 5 //连续显示分页数
    ,
    jump: function(obj, first) {
    //得到了当前页，用于向服务端请求对应数据
    var curr = obj.curr;
    if(!first) {
    //layer.msg('第 '+ obj.curr +' 页');
    }
    }
    });
    });



layui.use('form', function(){
var $ = layui.jquery, form = layui.form();

//全选
form.on('checkbox(allChoose)', function(data){
var child = $(data.elem).parents('table').find('tbody input[type="checkbox"]');
child.each(function(index, item){
item.checked = data.elem.checked;
console.log(data.elem.checked);
});

form.render('checkbox');
});

});
<?php $this->endBlock() ?>
<?php $this->registerJs($this->blocks['service'], \yii\web\View::POS_END); ?>
